package com.fancy.middleware.netty.config;

import io.netty.channel.DefaultEventLoopGroup;
import io.netty.channel.EventLoopGroup;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class NettyCommonConfiguration {

    @Bean("defaultEventLoopGroup")
    @ConditionalOnMissingBean(name = "defaultEventLoopGroup")
    public EventLoopGroup defaultEventLoopGroup(){
        return new DefaultEventLoopGroup();
    }
}
